package tw.com.diray.comm;

import tw.com.diary.ae.com.DirayBussinessException;

public class DialogFactory {

	public static MyDialog bulder(Exception e) {
		if (e instanceof DirayBussinessException) {

			DirayBussinessException ex = (DirayBussinessException) e;
			if (ex.getExCode().startsWith("W")) {
				return new WarmDialog();
			} else if (ex.getExCode().startsWith("E")) {
				return new ErrorDialog();
			}

		} else if (e instanceof Exception) {

		}

		return null;
	}
}
